3.23 \(\int e^{c (a+b x)} \cot ^2(d+e x) \, dx\)

Optimal. Leaf size=126 \[ \frac{4 e^{c (a+b x)} \text{Hypergeometric2F1}\left (1,-\frac{i b c}{2 e},1-\frac{i b c}{2 e},e^{2 i (d+e x)}\right )}{b c}-\frac{4 e^{c (a+b x)} \text{Hypergeometric2F1}\left (2,-\frac{i b c}{2 e},1-\frac{i b c}{2 e},e^{2 i (d+e x)}\right )}{b c}-\frac{e^{c (a+b x)}}{b c} \]

[Out]

-(E^(c*(a + b*x))/(b*c)) + (4*E^(c*(a + b*x))*Hypergeometric2F1[1, ((-I/2)*b*c)/e, 1 - ((I/2)*b*c)/e, E^((2*I)
*(d + e*x))])/(b*c) - (4*E^(c*(a + b*x))*Hypergeometric2F1[2, ((-I/2)*b*c)/e, 1 - ((I/2)*b*c)/e, E^((2*I)*(d +
 e*x))])/(b*c)

________________________________________________________________________________________

Rubi [A]  time = 0.124692, antiderivative size = 126, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {4443, 2194, 2251} \[ \frac{4 e^{c (a+b x)} \, _2F_1\left (1,-\frac{i b c}{2 e};1-\frac{i b c}{2 e};e^{2 i (d+e x)}\right )}{b c}-\frac{4 e^{c (a+b x)} \, _2F_1\left (2,-\frac{i b c}{2 e};1-\frac{i b c}{2 e};e^{2 i (d+e x)}\right )}{b c}-\frac{e^{c (a+b x)}}{b c} \]

Antiderivative was successfully verified.

[In]

Int[E^(c*(a + b*x))*Cot[d + e*x]^2,x]

[Out]

-(E^(c*(a + b*x))/(b*c)) + (4*E^(c*(a + b*x))*Hypergeometric2F1[1, ((-I/2)*b*c)/e, 1 - ((I/2)*b*c)/e, E^((2*I)
*(d + e*x))])/(b*c) - (4*E^(c*(a + b*x))*Hypergeometric2F1[2, ((-I/2)*b*c)/e, 1 - ((I/2)*b*c)/e, E^((2*I)*(d +
 e*x))])/(b*c)

Rule 4443

Int[Cot[(d_.) + (e_.)*(x_)]^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symbol] :> Dist[(-I)^n, Int[ExpandInteg
rand[(F^(c*(a + b*x))*(1 + E^(2*I*(d + e*x)))^n)/(1 - E^(2*I*(d + e*x)))^n, x], x], x] /; FreeQ[{F, a, b, c, d
, e}, x] && IntegerQ[n]

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2251

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Simp
[(a^p*G^(h*(f + g*x))*Hypergeometric2F1[-p, (g*h*Log[G])/(d*e*Log[F]), (g*h*Log[G])/(d*e*Log[F]) + 1, Simplify
[-((b*F^(e*(c + d*x)))/a)]])/(g*h*Log[G]), x] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x] && (ILtQ[p, 0] ||
 GtQ[a, 0])

Rubi steps

\begin{align*} \int e^{c (a+b x)} \cot ^2(d+e x) \, dx &=-\int \left (e^{c (a+b x)}+\frac{4 e^{c (a+b x)}}{\left (-1+e^{2 i (d+e x)}\right )^2}+\frac{4 e^{c (a+b x)}}{-1+e^{2 i (d+e x)}}\right ) \, dx\\ &=-\left (4 \int \frac{e^{c (a+b x)}}{\left (-1+e^{2 i (d+e x)}\right )^2} \, dx\right )-4 \int \frac{e^{c (a+b x)}}{-1+e^{2 i (d+e x)}} \, dx-\int e^{c (a+b x)} \, dx\\ &=-\frac{e^{c (a+b x)}}{b c}+\frac{4 e^{c (a+b x)} \, _2F_1\left (1,-\frac{i b c}{2 e};1-\frac{i b c}{2 e};e^{2 i (d+e x)}\right )}{b c}-\frac{4 e^{c (a+b x)} \, _2F_1\left (2,-\frac{i b c}{2 e};1-\frac{i b c}{2 e};e^{2 i (d+e x)}\right )}{b c}\\ \end{align*}

Mathematica [A]  time = 1.58555, size = 170, normalized size = 1.35 \[ e^{c (a+b x)} \left (-\frac{2 i e^{2 i d} \left ((b c+2 i e) \text{Hypergeometric2F1}\left (1,-\frac{i b c}{2 e},1-\frac{i b c}{2 e},e^{2 i (d+e x)}\right )-b c e^{2 i e x} \text{Hypergeometric2F1}\left (1,1-\frac{i b c}{2 e},2-\frac{i b c}{2 e},e^{2 i (d+e x)}\right )\right )}{\left (-1+e^{2 i d}\right ) e (b c+2 i e)}-\frac{1}{b c}+\frac{\csc (d) \sin (e x) \csc (d+e x)}{e}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[E^(c*(a + b*x))*Cot[d + e*x]^2,x]

[Out]

E^(c*(a + b*x))*(-(1/(b*c)) - ((2*I)*E^((2*I)*d)*(-(b*c*E^((2*I)*e*x)*Hypergeometric2F1[1, 1 - ((I/2)*b*c)/e,
2 - ((I/2)*b*c)/e, E^((2*I)*(d + e*x))]) + (b*c + (2*I)*e)*Hypergeometric2F1[1, ((-I/2)*b*c)/e, 1 - ((I/2)*b*c
)/e, E^((2*I)*(d + e*x))]))/((b*c + (2*I)*e)*e*(-1 + E^((2*I)*d))) + (Csc[d]*Csc[d + e*x]*Sin[e*x])/e)

________________________________________________________________________________________

Maple [F]  time = 0.085, size = 0, normalized size = 0. \begin{align*} \int{{\rm e}^{c \left ( bx+a \right ) }} \left ( \cot \left ( ex+d \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(c*(b*x+a))*cot(e*x+d)^2,x)

[Out]

int(exp(c*(b*x+a))*cot(e*x+d)^2,x)

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(c*(b*x+a))*cot(e*x+d)^2,x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\cot \left (e x + d\right )^{2} e^{\left (b c x + a c\right )}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(c*(b*x+a))*cot(e*x+d)^2,x, algorithm="fricas")

[Out]

integral(cot(e*x + d)^2*e^(b*c*x + a*c), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} e^{a c} \int e^{b c x} \cot ^{2}{\left (d + e x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(c*(b*x+a))*cot(e*x+d)**2,x)

[Out]

exp(a*c)*Integral(exp(b*c*x)*cot(d + e*x)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \cot \left (e x + d\right )^{2} e^{\left ({\left (b x + a\right )} c\right )}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(c*(b*x+a))*cot(e*x+d)^2,x, algorithm="giac")

[Out]

integrate(cot(e*x + d)^2*e^((b*x + a)*c), x)